package Controller;

import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import View.PanelHolder;
import View.PanelTransactie_MainTransacties;
import View.PanelAddTransaction;
import View.PanelTransactie_Rekeningen;



import Controller.RekeningOnClick;

public class RekeningOnClick implements MouseListener{
public PanelTransactie_Rekeningen pr;
	public RekeningOnClick(PanelTransactie_Rekeningen Pr){
		pr=Pr;
	}
	
		
		
		public void mouseReleased(MouseEvent arg0) {	
			pr.setBackground(Color.gray);
			PanelHolder holder = PanelHolder.getInstance();
			holder.remove(holder.getComponentAt(141, 0));
			holder.add(new PanelTransactie_MainTransacties().getInstance());
			holder.repaint();
			holder.validate();
		}
		
		
		public void mousePressed(MouseEvent arg0) {
			pr.setBackground(Color.cyan);
		}
		
		
		public void mouseExited(MouseEvent arg0) {	
			pr.setBackground(Color.gray);
			
		}
		
		
		public void mouseEntered(MouseEvent arg0) {
			pr.setBackground(Color.cyan);
			//moet het saldo laten zien.
		}
		
		
		public void mouseClicked(MouseEvent arg0) {
			pr.setBackground(Color.gray);

		}
	}	

